/**
 * 区域运营商
 */

import http from '@/utils/httpRequest'

export default {
  //联盟商家分类 分页列表
  classifyPage (param) {
    return http.get(http.adornUrl('/admin/union/business/classify/page'), { params: param })
  },
  //联盟商家分类 详情
  classifyInfo (id) {
    return http.get(http.adornUrl(`/admin/union/business/classify/info/${id}`))
  },
  //联盟商家分类 保存
  classifySave (data) {
    return http.post(http.adornUrl(`/admin/union/business/classify/save`), data)
  },
  //联盟商家分类 修改
  classifyUpdate (data) {
    return http.put(http.adornUrl(`/admin/union/business/classify/update`), data)
  },
  //联盟商家分类 删除
  classifyDelete (id) {
    return http.delete(http.adornUrl(`/admin/union/business/classify/delete/${id}`))
  },
  //联盟商家分类 设置联盟商家分类
  setClassify (id) {
    return http.delete(http.adornUrl(`/admin/union/business/classify/set/classify`))
  },
  //联盟商家分类 设置联盟商家分类
  shopShow (shopId) {
    return http.post(http.adornUrl(`/admin/yxt/shop/show/${shopId}`))
  },
  // 分类下拉列表
  classifyList () {
    return http.get(http.adornUrl(`/admin/union/business/classify/list`))
  },
  // 设置联盟商家分类
  setClassify (data) {
    return http.post(http.adornUrl(`/admin/union/business/classify/set/classify`), data)
  },
  // 后台区域代理查看管辖范围的线下订单
  offlineorderPage (param) {
    return http.get(http.adornUrl(`/admin/offlineorder/page`), { params: param })
  },
  // 区域代理查看商家上报的订单详情
  offlineorderInfo (id) {
    return http.get(http.adornUrl(`/admin/offlineorder/info/${id}`))
  },
  // 线下店铺列表
  myshopsList (id) {
    return http.get(http.adornUrl(`/admin/applyareaagent/myshops/list`))
  },
  // 财务列表
  myPointPage (param) {
    return http.get(http.adornUrl(`/admin/integral/record/myPointPage`), { params: param })
  },
  // 修改分类显示状态
  setClassifyShow (id) {
    return http.post(http.adornUrl(`admin/union/business/classify/show/${id}`))
  },
}
